<template>
  <div class="home-index-page">

      <div>当前时间： {{ curDate  }}</div>
      <div class="welcome">欢迎回家，管理员。</div>
  </div>
</template>
<script setup lang="ts">
import timeUtils from '@/utils/TimeUtils'
import { onMounted, ref  } from 'vue'

let timer = null;
let curDate = ref<string>( "" )
onMounted(()=>{
  if( timer != null ){
     clearInterval(timer);
  }
  timer = setInterval(()=>{
    curDate.value =  timeUtils.format(new Date())  
  }, 1000);
})



</script>
<style lang="scss" scoped>

@import "./indexView.scss"

</style>
